package com.bupt.smart.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bupt.smart.smart.R;

/**
 * Created by WWL on 2016/4/22.
 */
public class PaymentActivity extends AppCompatActivity {
    private String dingdanname;
    private String zhifujine;
    private TextView view_dingdanname;
    private TextView view_dingdanzongjia;
    private TextView view_haixuzhifu;
    private ImageView payment_back;
    private TextView order_name;
    private TextView order_price;
    private String ordername;
    private String orderprice;
    private String orderyouhui;
    private String shopID;
    Intent getIntent ;
    protected void onCreate( Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_payment);
        getIntent = getIntent();
        payment_back = (ImageView)findViewById(R.id.payment_back);
        //获取订单名称和订单金额
        shopID = getIntent().getStringExtra("shopID");
        ordername = getIntent.getStringExtra("order_name");
        orderprice = getIntent.getStringExtra("order_price");
        orderyouhui = getIntent.getStringExtra("order_youhui");
        //获取layout中的元素
        order_name = (TextView)findViewById(R.id.order_name);
        order_price = (TextView)findViewById(R.id.order_price);
        //将获取到的值赋值给他们
        order_name.setText(ordername);
        order_price.setText(orderprice);

        //上方跳转返回订单页面
        payment_back.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(PaymentActivity.this,OrderActivity.class);
                intent.putExtras(getIntent);
                PaymentActivity.this.startActivity(intent);
            }
        } );



}

}